import pandas as pd

list=[['两年半','两年半','两年半'],['两年半','两年半','两年半'],['两年半','两年半','两年半'],['两年半','两年半','两年半']]
index = ["贡景超练习生1","贡景超练习生2","贡景超练习生3","贡景超练习生4"]
columns = ["唱","跳","Rap"]
df= pd.DataFrame(list,index,columns)

gjc = df.rename({'Rap':'篮球'},axis='columns')
gjc['篮球'] = ['两年半','两年半','两年半','两年半']

gjc1 = df.rename({'唱':'基尼太美'},axis='columns')
gjc1['基尼太美'] = ['两年半','两年半','两年半','两年半']



print('练习时长/年：\n',df)
print('修改Rap列为篮球列后的练习时长/年：\n',gjc)
print('修改唱列为基尼太美列后的练习时长/年：\n',gjc1)

gjc1['只因你太煤'] = ['两年半','两年半','两年半','两年半']
print('添加列：\n',gjc1)

gjc1.loc['贡景超练习生5']=['两年半','两年半','两年半','两年半']
print('添加行：\n',gjc1)

gjc1.insert(2,'唱',['两年半','两年半','两年半','两年半'])
print('添加指定列：\n',gjc1)






